package com.wenhao.tencent;

import java.util.LinkedList;
import java.util.Scanner;

/**
 * @author Wenhao Tong
 * @create 2021-08-22 21:08
 */
public class Main4 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        String s = scanner.next();
        if (k == 0) {
            System.out.println();
            return;
        }
        k = n - k;
        LinkedList<Character> stack = new LinkedList<>();
        for (int i = 0;i < s.length();i++) {
            char c = s.charAt(i);
            while (stack.size() > 0 && stack.peek() < c) {
                if (k == 0) {
                    while (stack.size() > 0) {
                        System.out.print(stack.pollLast());
                    }
                    System.out.println(s.substring(i));
                    return;
                }
                stack.pop();
                k--;
            }
            stack.push(c);
        }
        while (stack.size() > 0) {
            System.out.print(stack.pollLast());
        }
        System.out.println();
    }
}
